﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RuleCode.Table;

namespace map.member
{
    public partial class brokeropervalid : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.Params["cbshopid"]))
                {
                    this.TextBox2.Text = Request.Params["cbshopid"];
                    this.TextBox2.ReadOnly = true;
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            //处理Cookie
            if (!cbuser.thirdlogin(TextBox2.Text,AliApi.appUserId, TextBox3.Text))
            {
                MessageBox.Show(this.Page, "用户名或者密码错误.");
                return;
            }
            //if (! cbuser.login(TextBox1.Text,
            //            TextBox3.Text))
            //{
            //    MessageBox.Show(this.Page, "用户名或者密码错误.");
            //    return;
            //}
            if (this.Request.Params["redirecturl"] == null)
            {
                this.Response.Redirect(ResolveUrl("~/default.aspx"));
            }
            else
            {
                this.Response.Redirect(this.Request.Params["redirecturl"].ToString());
            }
        }
    }
}
